diff --git a/2019/include/class-Homepage19.php b/2019/include/class-Homepage19.php index c394f97..d33cdf3 100644 --- a/2019/include/class-Homepage19.php +++ b/2019/include/class-Homepage19.php @@ -1,62 +1,92 @@ . /** * Some utilities for the 2019 Homepage */ class Homepage19 { + /** + * Query all the Events from this Conference + * + * Query all the events that belongs to this Conference + * and that belongs to this Track. + * + * @param object $conference Conference + * @param string $track Track + * @generator + */ + public static function eventsFromConferenceTrack( $conference, $track ) { + return FullEvent::factoryByConference( $conference->getConferenceID() ) + ->select( [ + Conference::UID, + Event::ID_, + Event::TITLE, + Event::SUBTITLE, + Event::ABSTRACT, + Event::START, + Event::END, + Event::UID, + Track::UID, + Chapter::UID, + Room::UID, + ] ) + ->whereStr( Track::UID, $track ) + ->orderBy( Event::START, 'ASC' ) + ->queryGenerator(); + } + /** * Get the list some authors of an Event * * @param Event $event * @param string $default Default text * @return string */ public static function listEventAuthors( $event, $default ) { // prepare to request Event's Users $query = new Query(); $query->from( EventUser::T ); // limit to this event $query->whereInt( 'event_ID', $event->getEventID() ); // join with Users $query->joinOn( 'INNER', User::T, User::ID_, EventUser::USER_ ); // order by User name $query->orderBy( 'user_name' ); // run the query and get a Generator $users = $query->queryGenerator( EventUser::class ); // collect the entries $all = []; foreach( $users as $user ) { $all[] = HTML::a( $user->getUserURL(), esc_html( $user->getUserFullName() ) ); } return $all ? implode( ', ', $all ) : $default; } } diff --git a/2019/index.php b/2019/index.php index ff69bb1..69cf487 100644 --- a/2019/index.php +++ b/2019/index.php @@ -1,392 +1,383 @@ . require 'load.php'; enqueue_js('jquery'); enqueue_js('typed'); enqueue_js('leaflet'); enqueue_js('leaflet.init'); enqueue_css('leaflet'); $conference = FullConference::factoryFromUID( CURRENT_CONFERENCE_UID ) ->queryRow(); if( !$conference ) { die_with_404(); } template( 'header', [ 'conference' => $conference, 'intro' => true, 'canonical' => $conference->getConferenceURL( true ), ] ); ?>

aula base, l'aula per sistemisti o programmatori e divertiti!" ) ?>

getConferenceStart(); - - // query all the events that belongs to this conference - // and that belongs to this chapter - // order by date - $events = - FullEvent::factoryByConference( $conference->getConferenceID() ) - ->whereStr( Track::UID, $track ) - ->orderBy( Event::START, 'ASC' ) - ->queryResults(); ?> - + get( Event::START ) ?>

getEventURL(), esc_html( $event->getEventTitle() ) ) ?>

hasEventSubtitle() ): ?>

getEventSubtitle() ) ?>

 getEventStart( 'H:i' ) ?> (getHumanEventDuration( [ 'long' => false ] ) ?>)
 

hasEventAbstract() ) { echo $event->getEventAbstractHTML(); } ?>

 info

 

isEventEditable() ): ?> getFullEventEditURL(), __( "Modifica" ) ) ?>
add( $one_hour ); $last_event_end = clone $last_event_start; $last_event_end->add( $one_hour ); ?>

printLocationLeaflet() ?>